var gulp = require("gulp");
var ts = require("gulp-typescript");
var tsProject = ts.createProject("tsconfig.json");
var fs = require('fs');
var json = JSON.parse(fs.readFileSync('./package.json'));
var fp = `../../functions/${json['name']}/`



gulp.task("default", async function (cb) {
    await gulp.src(["./*.ts"]).pipe(tsProject()).js.pipe(gulp.dest(fp));
    await gulp.src(['./package.json']).pipe(gulp.dest(fp));
    return
});